{block name=body} 
{* Define the function *} {function name=options_list level=0} 
	{foreach $opts as $opt}
		{if $level eq 0}
			<optgroup label="{$opt.value}">
		{else}
			<option value="{$opt.id}" {if $selected eq $opt.id}selected="selected"{/if}>{$opt.value}</option>
		{/if}
		{if count($opt.subs) > 0} {call name=options_list opts=$opt.subs level=$level+1 } {/if} 
	{/foreach} 
{/function}

<div id="partycont">
	<div class="container">
		<div class="row">
			<div class="col-sm-8">
				<div class="visible-md visible-lg">
					{include file='breadcrumbs.tpl'} 
				</div>
	  			<h1 class="title" id="partytitle">{$listing_name}</h1>
					{$listing_content1}
			</div>
			<div class="col-sm-4 hidden-xs">
  				<img src="/images/eventkids.png" alt="" class="img-responsive eventkids" />
			</div>
		</div>
	</div>
</div>

<div>
	<div class="container">
		<div class="row">			
			<div class="party">
<!-- 			<div class="col-sm-12 partyblock">
				<h3>标准派对</h3>
			</div> -->
			<div class="col-sm-12 partyblock">
<!-- 				<div class="top circle">
					From $160*
				</div> -->

				<h3 class="blue">请从下列三种澳睿跑活动包中选择:</h3>
				
				<div class="row sports">
					<div class="col-sm-4">橄榄球和板球</div>
					<div class="col-sm-4">足球和田径</div>
					<div class="col-sm-4">橄榄球和篮球</div>
				</div>
			</div>
			<div class="col-sm-12 partyblock">
				1个小时的体育活动和有趣的游戏环节将由我们最优秀的外教带领进行，并配备我们的专业课程教具
			</div>
			<div class="col-sm-12 partyblock">
				生日派对邀请函
			</div>
			<div class="col-sm-12 partyblock">
				给男孩或女孩的特别生日礼物
			</div>
			<div class="col-sm-12 partyblock">
				所有参与的小朋友将得到免费课程体验券
			</div>			
			<div class="col-sm-12 partyblock">
				*最少10个孩子参加
				<br />
				<a href="javascript:void(0)" class="enquire" onclick="updatePackage('standard')">
					<button type="button" class="enquire" ><span>现在预订</span></button>
				</a>
				<br />
			</div>
			</div>
			
			
			<div class="party">
			<div class="col-sm-12">
				<h3>定制您的派对包</h3>
				了解我们提供的<a href="/our-program/sports">体育项目</a>，从中选择，我们将为您进行组合。
				<br />
				<a href="javascript:void(0)" class="enquire" onclick="updatePackage('custom');">
					<button type="button" class="enquire"><span>现在预订</span></button>
				</a>
				<br />
			</div>
			</div>
			
			
		</div>
	</div>
</div>



<div id="enroltrialhead">
	<div class="container">
		<div class="row">
			<div class="col-sm-12 text-center">
				咨询聚会活动
			</div>
		</div>
	</div>
</div>

<div id="enroltrialmain">
	<div class="container">
		<div class="row">
			<div class="col-sm-8 col-sm-offset-2">
			<div class="row">
				{if $error}
					<div id="error" class="alert alert-danger fade in text-center">
						<button class="close" aria-hidden="true" data-dismiss="alert" type="button">&times;</button>
						<strong class="text-danger">{$error}</strong>
					</div>
				{/if}
				<form id="party_form" method="post" action="/process/contact-us" novalidate="novalidate">
			
					<div class="col-sm-6 form-group">
						<label for="name">{$lang.contact.name}</label>
						<input type="text" id="name" name="name" value="{if $post}{$post.name}{else}{$user.gname} {$user.surname}{/if}" required />
					</div>
					
					<div class="col-sm-6 form-group">
						<label for="email">{$lang.contact.email}</label>
						<input type="email" id="email" name="email" value="{if $post}{$post.email}{else}{$user.email}{/if}" required />
					</div>
					
					<div class="col-sm-6 form-group">
						<label for="phone">{$lang.contact.phone}</label>
						<input type="text" id="phone" name="phone" value="{if $post}{$post.phone}{else}{$address.S.address_telephone}{/if}" required />
					</div>
					
					<div class="col-sm-6 form-group">
						<label for="postcode">{$lang.contact.postcode}</label>
						<input type="text" id="postcode" name="postcode" value="{if $post}{$post.postcode}{else}{$address.S.address_postcode}{/if}" pattern="[0-9]" required />
					</div>
					
					<div class="col-sm-6 form-group">
						<label for="package">{$lang.contact.package}</label>
						<div>
						<select id="package" name="package" class="required">
							<option value="">{$lang.contact.select}</option>
							<option value="standard">{$lang.contact.standard}</option>
							<option value="custom">{$lang.contact.custom}</option>
						</select>
						</div>
					</div>
					
					<div class="col-sm-6 form-group" id="hearcont">
						<label for="hearabout">{$lang.contact.hear}</label>
						<div>
						<select id="hearabout" tabindex="0" class="required" name="hear_about_us">
							<option value="">{$lang.contact.select}</option>
								{if $post}{assign var='selected' value=$post.hear_about_us}{else}{assign var='selected' value=$user.user_hearabout}{/if}
								{call name=options_list opts=$hearabout selected=$selected}
						</select>
						</div>
					</div>
					
					<div class="col-sm-12 form-group">
						<label for="enquiry">{$lang.contact.enquiry}</label>
						<div class="small">向我们大概介绍这次您希望举行的活动，生日男孩或者女孩的名字，活动举办地址和日期，你的孩子马上多大了，多少个小朋友会参加等等。</div>
						<textarea id="enquiry" name="enquiry" required >{if $post}{$post.enquiry}{/if}</textarea>
					</div>
					
					<div class="col-sm-12 form-group hide">
						<label for="additional">{$lang.contact.add_info}</label>
						<input type="text" id="additional" name="additional" value="" >
						<input type="hidden" id="reference_page" name="reference_page" value="{$listing_name}" >
						<input type="hidden" id="reference_page_objid" name="reference_page_objid" value="{$listing_object_id}" >
						<input type="hidden" id="token" name="formToken" value="{$token}" >
					</div>
					
					<div class="col-sm-12">
						<button class="enquire" onclick="" type="submit"><span>现在预订</span></button>
					</div>
					
					</form>
			</div>
			
			</div>
		</div>
	</div>
</div>
{include file='helpblock.tpl'}

{/block}

{block name=tail}      
<script type="text/javascript">
$(function(){
	$('select').selectBoxIt();
});	
$(document).ready(function(){
	
	 	$('#party_form').validate();
	 	
	 	$('#postcode').rules("add", {
			digits: true,
			minlength: 4
		});

	 	$('#email').rules("add", {
			email: true
		});
 	  
});
function updatePackage(OPT){
	var selectPackage = $("select#package").selectBoxIt().data("selectBox-selectBoxIt");
	scrolltodiv('#enroltrialhead'); 
	$('#package').val(OPT); 
	selectPackage.selectOption(OPT);
}
</script>
{/block}
